<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">
    <ui:composition template="/layout/masterpage_admin.xhtml">
        <f:metadata>
            
            <f:event type="preRenderView" listener="#{sys_NguoiDungController.onPageLoad_CheckAdmin()}">
                
            </f:event>
        </f:metadata>
        
         <ui:define name="ui-header">
             <title>#{utilsController.getLanguages("TaoMoiCapNhat")}</title>
        </ui:define>
        
        
        <ui:define name="ui-content">
            <div class="panel panel-blue margin-bottom-40">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-tasks"></i> #{utilsController.getLanguages("DichVuNganHang")}</h3>
                </div>
                <div class="panel-body"> 
                    <c:set var="vNganHang" value="#{c_TuVanChoVayController.findAllNganHang()}" scope="session"/>
                    
                    <h:form class="margin-bottom-40" id="frmtuvanchovay">
                        <p:growl id="growl" showDetail="true" sticky="true" escape="false" />  
                        <div class="form-group">
                            <label for="cboNganHangID">#{utilsController.getLanguages("NganHang")}</label>
                            <select  id="cboNganHangID" class="form-control" value="#{c_TuVanChoVayController.item.nganHangID}" >
                                <c:forEach items="#{vNganHang}" var="item">
                                    <option value="#{item.getID()}">#{item.getTenNH()}</option>
                                </c:forEach>
                            </select>
                        </div>
                       <div class="form-group">
                            <label for="cboLoai">#{utilsController.getLanguages("Loai")}</label>
                            <select  id="cboLoai" class="form-control" value="#{c_TuVanChoVayController.item.loai}" >
                                <option value="M">#{utilsController.getLanguages("Month")}</option>
                                <option value="Y">#{utilsController.getLanguages("Year")}</option>
                            </select>
                        </div>
                        <div class="form-group">
                           <label for="txtLaiXuat">#{utilsController.getLanguages("LaiXuat")}</label>
                           <input id="txtLaiXuat" class="form-control" value="#{utilsController.formatNumber(c_TuVanChoVayController.item.laiXuat, '#,###.##')}" />
                        </div>
                        <div class="form-group">
                           <label for="txtPTThanhToanTruoc">#{utilsController.getLanguages("PTThanhToanTruoc")}</label>
                           <input id="txtPTThanhToanTruoc" class="form-control" value="#{utilsController.formatNumber(c_TuVanChoVayController.item.PTThanhToanTruoc, '#,###.##')}" />
                        </div>
                        <div class="form-group">
                           <label for="txtDienGiai">#{utilsController.getLanguages("DienGiai")}</label>
                           <input id="txtDienGiai" class="form-control" value="#{c_TuVanChoVayController.item.dienGiai}" />
                        </div>
                        <button class="btn-u btn-u-blue" type="button" onclick="Save_TuVanChoVay_Click();">#{utilsController.getLanguages("Save")}</button>
                        <a href="/Admin/c/dich-vu-ngan-hang.html" class="btn-u btn-u-aqua">#{utilsController.getLanguages("Cancel")}</a>
                        <p:remoteCommand name="Save_TuVanChoVay" actionListener="#{c_TuVanChoVayController.btnSave_Click}" update=":frmtuvanchovay"></p:remoteCommand>
                    </h:form>
                </div>
            </div>
            
        </ui:define>
    </ui:composition> 
</html>